package com.gf.snoopy.constants.enumc;

public enum PayType {
	MONTH(0,"按月付息"),
	QUARTER(1,"按季度付息"),
	YEAR(2,"按年付息"),
	PRIORITY_FIRST(3,"优先级本息偿付完毕后付息"),
	PAY_ALL(4,"到期一次还本付息");
	
	private Integer code;
	
	private String desc;
	
	private PayType(Integer code, String desc){
		this.setCode(code);
		this.setDesc(desc);
	}
	
	public static PayType parse(Integer code){
		for(PayType type:PayType.values()){
			if(type.getCode().equals(code)){
				return type;
			}
		}
		return null;
	}
	

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
